package com.fzrskj.cloud.free.core.enums;

/**
 * PriceTypeEnum.
 *
 * @author zj.
 *         Created on 2018/10/19 0019.
 */
public enum  PriceTypeEnum {
    /**
     * year.
     */
    YEAR("y"),
    /**
     * month.
     */
    MONTH("m"),
    /**
     * day.
     */
    DAY("d");

    /**
     * flag.
     */
    private String flag;
    PriceTypeEnum(String flag) {
        this.flag = flag;
    }

    /**
     * equals.
     * @param value
     * @return
     */
    public boolean equals(String value) {
        return this.flag.equals(value.toLowerCase());
    }

    /**
     * get flag.
     * @return flag.
     */
    public String getFlag() {
        return this.flag;
    }
}
